# -*- coding: utf-8 -*-
# ㊎ Author : XMZ
# ㊍ Time : 2021/9/27 14:42
# ㊌ File : formula -> version_v1.py
# ㊋ IDE :  PyCharm
# ㊏ 
import os
import sys
from django.conf.urls import url
from django.urls import path, include
from django.contrib import admin
from rest_framework_simplejwt.views import (
    TokenObtainPairView,
    TokenRefreshView,
    TokenVerifyView,
)
from rest_framework.documentation import include_docs_urls
from django.views import static

self_path = os.path.dirname(os.path.abspath(__file__))
father_path = os.path.dirname(self_path)
parent_path = os.path.dirname(father_path)
sys.path.append(self_path)
sys.path.append(father_path)
sys.path.append(parent_path)
urlpatterns = [
    path('admin', admin.site.urls),
    path('token', TokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('token/refresh', TokenRefreshView.as_view(), name='token_refresh'),
    path('token/verify', TokenVerifyView.as_view(), name='token_verify'),
    path('docs', include_docs_urls(title="Formula Api 文档", description="Django 接口文档")),
    path('api-auth', include('rest_framework.urls', namespace="rest_framework")),  # DRF登录的配置
    url(r'^log/(?P<path>.*)$', static.serve, {'document_root': 'file_path'}, name='static'),
    path('auth/', include("auth_user.urls")),  #
]
